Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move tests to separate repo #5203

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mversic
Copy link
Contributor

@mversic mversic commented Oct 29, 2024

This PR moves integration tests from iroha to a separate root crate.
Finally, integration tests no longer have transparent_api enabled.
This has also uncovered dependency of tests on some questionable crate like iroha_telemetry

Also I've followed up on #5113 which didn't include triggers and smart contracts

closes #5168

@mversic mversic force-pushed the move_integration_test branch 2 times, most recently from 6324385 to 5f4b5db Compare October 29, 2024 15:44
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what to do about these tests. IMO tests should be reflect real use cases because their point is to mimick what a user would do. Therefore, a test cannot depend on iroha_telemetry.

A question that comes out of this is why would we support returning SCALE encoded status. This should just be Json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've come to understand this was the reason to implement SCALE encoding for the /status http request. I'm not particularly thrilled by this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided to remove this test

@mversic mversic force-pushed the move_integration_test branch 6 times, most recently from a4b8c08 to df808b1 Compare October 29, 2024 17:07
@@ -3,14 +3,14 @@ set -e

case $1 in
"genesis")
cargo run --release --bin kagami -- genesis generate --executor executor.wasm --wasm-dir libs --genesis-public-key ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4 | diff - defaults/genesis.json || {
echo 'Please re-generate the default genesis with `cargo run --release --bin kagami -- genesis --executor executor.wasm --wasm-dir libs --genesis-public-key ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4 > ./defaults/genesis.json`'
cargo run --package iroha_kagami --bin kagami --release -- genesis generate --executor executor.wasm --wasm-dir libs --genesis-public-key ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4 | diff - defaults/genesis.json || {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that the unfortunate consequence of defining a root crate iroha_tests now hinders our use of cargo run --bin. This is quite weird

@mversic mversic force-pushed the move_integration_test branch 4 times, most recently from 211e782 to a011f75 Compare October 29, 2024 18:32
@mversic mversic marked this pull request as draft November 1, 2024 07:25
@mversic mversic force-pushed the move_integration_test branch from a011f75 to 163fe59 Compare November 6, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move integration tests out of iroha
1 participant